
/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __DEFINES_H__
#define __DEFINES_H__

#ifdef __cplusplus
extern "C" {
#endif


#ifndef nullptr
#define nullptr NULL
#endif

#define BUF_MAX_SIZE    (1024)
#define MAX_FRAME_SIZE  (BUF_MAX_SIZE * 100)

#define IMAGE_FILE_PATH     "/userdata/photo/"
#define VIDEO_FILE_PATH     "/userdata/video/"
#define RECV_FILE_PATH      "/userdata/menu/"
#define IMAGE_DEFAULT_PATH  "/sdcard/image/"
#define VIDEO_DEFAULT_PATH  "/sdcard/video/"

#define MENU_VIDEO_PATH "/userdata/thumb/"

#define FILE_MODE_ALL   777

#define FILE_TYPE_VIDEO     0
#define FILE_TYPE_IMAGE     1
#define FILE_TYPE_UNKNOW    2

#define BROADCAST_SERVER    8559
#define SERVER_PORT         8554
#define SERVER_RTP_PORT     55532

#define CMD_WRITE           (0)
#define CMD_READ            (1)
#define CMD_NULL            (-1)
#define CMD_CANCEL          (-2)


#ifdef __cplusplus
}
#endif
#endif  /* __DEFINES_H__ */
